﻿@model PageArtistsSearchResultModel
@using CommandLib
@using FindArtInfo.Models
@using Resources
@{
    ViewBag.Title = "Art auction result - Artist " + Model.ArtistsSearchResultKeyWord;
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<table width="100%" cellspacing="0" cellpadding="0" border="0" id="table5">
    <tr><td valign="top" align="left">&nbsp;</td></tr>
    <tr>
        <td valign="top" align="left">
            <h1 class="underline">@string.Format(Multi.PageArtistsSearchResultTitle, Model.ArtistsSearchResultKeyWord)</h1>
            @if (Model.ListArtist.Count == 0)
            {            
                <div align="center">
                    @Html.Raw(string.Format(Multi.PageArtistsSearchResultMessageNoMatchFound, Model.ArtistsSearchResultKeyWord))
                </div>             
            }
            else
            {     
                <h2>                        
                    @string.Format(Multi.PageArtistsSearchResultMessageMatchFound, Utils.FomatNumber(Model.TotalRecord.ToString()), Utils.FomatNumber(Model.PageIndex.ToString()), Utils.FomatNumber(Model.TotalPage.ToString()), Utils.FomatNumber(Model.PageSize.ToString()))                    
                </h2>
                <table width="100%" cellspacing="0" cellpadding="4" border="0" id="table6">
                    <tr>
                        <td><b>@Html.LabelFor(m=>m.ArtistsSearchResultTblHeaderArtistInfo, Multi.PageArtistsSearchResultTblHeaderArtistInfo)</b></td>
                        <td width="50" align="center">
                            <img width="20" border="0" height="20" src="/Content/Images/icon_hammer.gif" alt="Hammer prices" class="hand">
                        </td>
                        <td width="50" align="center">
                            <img width="20" border="0" height="20" src="/Content/Images/icon_photo.gif" alt="Photos of artwork" class="hand">
                        </td>
                        <td width="50" align="center">
                            <img width="20" border="0" height="20" src="/Content/Images/icon_fjer.gif" alt="Signatures" class="hand">
                        </td>
                    </tr>
                    <tr><td colspan="4"><hr size="1"></td></tr>                                                                                           
                    @foreach(var item in Model.ListArtist)
                    {
                        string auctionTime = string.Format(Multi.PageArtistSearchResultLastAuctionTime, (item.AuctionTime.HasValue ? item.AuctionTime.Value.ToString("MM-dd-yyyy"):""));                 
                        <tr onmouseout="MouseMove(this,'out')" onmouseover="MouseMove(this,'in')" >                                              
                            <td>
                                <span  class='linkgoogle'>
                                    @{
                                        string linkText = @item.FullName + " (" + ((item.Born == 0 ? "" : item.Born.ToString()) + "-" + (item.Died == 0 ? "" : item.Died.ToString())) +") " + item.CountryName.Replace("Country unknown", string.Empty);
                                    }                                    
                                    <a href="~/@Utils.GetUrlByLanguage(CookiesStore.GetCookies(Constants.Cookie.COOKIE_LANGUAGE))/list-prices-by-artist/@item.ArtistId/@(Utils.UnicodeToKoDauAndGach(item.FullName)).html" title="@auctionTime">@HttpUtility.HtmlDecode(linkText)</a>
                                </span>
                            </td>
                            <td align='middle'>                                
                                <a href="~/@Utils.GetUrlByLanguage(CookiesStore.GetCookies(Constants.Cookie.COOKIE_LANGUAGE))/list-prices-by-artist/@item.ArtistId/@(Utils.UnicodeToKoDauAndGach(item.FullName)).html">@item.CountPrice</a>
                            </td>
                            <td align='middle'>
                                <span  class='linkgoogle' >                                    
                                    <a href="~/@Utils.GetUrlByLanguage(CookiesStore.GetCookies(Constants.Cookie.COOKIE_LANGUAGE))/list-prices-has-art-work-by-artist/@item.ArtistId/@(Utils.UnicodeToKoDauAndGach(item.FullName)).html">@item.CountArtWork</a>
                                </span>
                            </td>
                            <td align='middle'>
                                <span  class='linkgoogle' >                                    
                                    <a href="~/@Utils.GetUrlByLanguage(CookiesStore.GetCookies(Constants.Cookie.COOKIE_LANGUAGE))/list-signatures-by-artist/@item.ArtistId/@(Utils.UnicodeToKoDauAndGach(item.FullName)).html">@item.CountSignatures</a>
                                </span>
                            </td>                            
                        </tr>
                    }
                    <tr align="center">
                        <td align="center" colspan="4">
                            @Html.Partial("_PartialPaging", new PartialPagingModel { PageIndex = Model.PageIndex, PageSize = Model.PageSize, TotalPage = Model.TotalPage, TotalRecord = Model.TotalRecord, Url = Model.Url })
                        </td>
                    </tr>
                                                        
                    <tr align="right">
                        <td colspan="4">
                            <p align="right">                                
                                <a href="~/@Utils.GetUrlByLanguage(CookiesStore.GetCookies(Constants.Cookie.COOKIE_LANGUAGE))/advanced-search.html">@Multi.PageArtistsSearchResultSearchAgain</a> | <a href="~/faq.html">@Multi.PageArtistsSearchResultHowToSearch</a>
                            </p>
                            <h2 align="center">                                
                                @Html.Raw(string.Format(Multi.PageArtistsSearchResultFooter, Model.ArtistsSearchResultKeyWord))
                            </h2>
                        </td>
                    </tr>
                </table>             
            }             
        </td>
    </tr>
    <tr><td valign="top" align="left">&nbsp;</td></tr>
</table>
